# Fetching a single Expense

You can request either `GET /api/v1/expenses.json?only=5` or
`GET /api/v1/expenses/5.json`.  In both cases, default filters will be applied. Unless you
provide the `from_archived_workspaces:true` filter you won't receive expenses from archived projects,
and will get a 404 status on the "show" route.
This endpoint returns structured Expense objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `expenses` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: GET /expenses/{id}
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    The ID of the Model.

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `active_submission` (ExpenseReportSubmission) - The active expense report the expense is submitted in. The response will include `active_submission_id`, which references the data in the `expense_report_submissions` top-level key.
- `expense_budget` (ExpenseBudget) - Retrieves the expense budget the expense is logged to. The response will include `expense_budget_id`, which references the data in the `expense_budgets` top-level key.
- `expense_category` (ExpenseCategory) - The category associated with the expense. The response will include `expense_category`, which references the data in the `expense_categories` top-level key.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `receipt` (Attachments::ReceiptAttachment) - Information about receipts associated with this expense. The response will include `receipt_id`, which references the data in the `attachments` top-level key.
- `recent_submission` (ExpenseReportSubmission) - The most recent expense report the expense was submitted in, including any rejected or cancelled reports. The response will include `recent_submission_id`, which references the data in the `expense_report_submissions` top-level key.
- `role` (Role) - The role of the user. The response will include `role_id`, which references the data in the `roles` top-level key.
- `story` (Story) - Linked task. The response will include `story_id`, which references the data in the `stories` top-level key.
- `user` (User) - The user who created the expense. The response will include `user_id`, which references the data in the `users` top-level key.
- `vendor` (Vendor) - The party to which the expense is payable. The response will include `vendor_id`, which references the data in the `vendors` top-level key.
- `workspace` (Workspace) - The project to which this expense belongs. The response will include `workspace_id`, which references the data in the `workspaces` top-level key.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

